package com.example.administrator.logdemo_and_activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class LogActivity extends AppCompatActivity {
    private static final String ACTIVITY_TAG="LOGDEMO";
    private Button bt;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_log);
        bt = (Button)findViewById(R.id.btlog);
        bt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.v(LogActivity.ACTIVITY_TAG,"This is Verbose.");
                Log.d(LogActivity.ACTIVITY_TAG,"This is Debug.");
                Log.i(LogActivity.ACTIVITY_TAG,"This is Informations.");
                Log.w(LogActivity.ACTIVITY_TAG,"This is Wearing.");
                Log.e(LogActivity.ACTIVITY_TAG,"This is Error.");
            }
        });
    }
}
